<!--
 * @Author: WangGuojian 1085844536@qq.com
 * @Date: 2023-02-17 23:18:02
 * @LastEditTime: 2023-04-23 23:59:14
 * @LastEditors: WangGuojian 1085844536@qq.com
 * @FilePath: \guigu-oa\guigu-oa-web\src\views\test.vue
 * @Description:
-->
<template>
    <div>
        <div>账号切换</div>
        <button @click="zhangsan()" type="default" size="mini">张三</button>
        <button @click="lisi()" type="default" size="mini">李四</button>
        <button @click="zzjl()" type="default" size="mini">张总经理</button>
        <button @click="admin()" type="default" size="mini">admin</button>
        <div>当前token：{{ token }}</div>
    </div>
</template>

<script>
export default {
    name: 'Test',

    data() {
        return {
            token: '',
        };
    },

    created() {
        this.token = window.localStorage.getItem('token');
    },

    methods: {
        admin() {
            window.localStorage.setItem('token', '');
            let token =
                'eyJhbGciOiJIUzUxMiIsInppcCI6IkdaSVAifQ.H4sIAAAAAAAAAKtWKi5NUrJScgwN8dANDXYNUtJRSq0oULIyNDc0Nrc0NLU00VEqLU4t8kwBikGYeYm5qUAtiSm5mXlKtQAjVgWSQgAAAA.9Ln-USnsV9YDg5KpRqqW_M-fLKTI2lpq-viSy3MR6I9KR3kT0lpduwZ-7g5JgsczLoz8ON9u_Uapg7EpjYxNUw';
            window.localStorage.setItem('token', token);
            this.token = window.localStorage.getItem('token');
        },

        zhangsan() {
            window.localStorage.setItem('token', '');
            let token =
                'eyJhbGciOiJIUzUxMiIsInppcCI6IkdaSVAifQ.H4sIAAAAAAAAAKtWKi5NUrJScgwN8dANDXYNUtJRSq0oULIyNDc0tjAwNDUw0VEqLU4t8kxRsjKHMPMSc1OBWqoyEvPSjZVqAYAzYHRDAAAA.a3pwk244gXGZDqb8DJAe3wulp8o3X6nngTjZruO83XOq6Sn7DPq2sdv4nIfT2qn7NwrDV1XuA3eNKcGdvzEjsQ';
            window.localStorage.setItem('token', token);
            this.token = window.localStorage.getItem('token');
        },

        zzjl() {
            window.localStorage.setItem('token', '');
            let token =
                'eyJhbGciOiJIUzUxMiIsInppcCI6IkdaSVAifQ.H4sIAAAAAAAAAKtWKi5NUrJScgwN8dANDXYNUtJRSq0oULIyNDM3NjMwNLYw11EqLU4t8kxRsjKFMPMSc1OBWqqqsnKUagGHebUNQQAAAA.FcCkD6QfaP8bd_3MYsRD6Tp9wr9JSRFWIUuIdG5O7XxhIeyWfzGLp40_Lesx_kWMMaaskh_ba3NrTlj8-nP6OA';
            window.localStorage.setItem('token', token);
            this.token = window.localStorage.getItem('token');
        },

        lisi() {
            window.localStorage.setItem('token', '');
            let token =
                'eyJhbGciOiJIUzUxMiIsInppcCI6IkdaSVAifQ.H4sIAAAAAAAAAKtWKi5NUrJScgwN8dANDXYNUtJRSq0oULIyNDc0tjAwNDUx0FEqLU4t8kxRsjKBMPMSc1OBWnIyTZRqARH9jtFAAAAA.lfQq2a3cmUNJY_AM-iOBVp9e0ulgHel1pDvczRMmnpZWUZgUQqtgzXbNLwsxvQexx4JtnLqe38PVEHdR25ytkA';
            window.localStorage.setItem('token', token);
            this.token = window.localStorage.getItem('token');
        },
    },
};
</script>
